#include <stdio.h>

int sum(int x)
{
  int i = 0, s = 0;
  while(i <= x)
  {
    s += i++;
  }
  return s;
}




int main()
{
  printf("code ready!\n");
  
  int i = 0, n = 0;
  while(i <= 1000)
  {
    n += sum(i++);
  }

  printf("code finsh, the result is %d\n", n);

  return 0;
}
